package com.five.service.impl;

import com.five.dao.UserParticipantMapper;
import com.five.entity.UserParticipant;
import com.five.service.UserParticipantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/2/27.
 */
@Service("UserParticipantService")
public class UserParticipantServiceImpl implements UserParticipantService {


    @Autowired
    private UserParticipantMapper userParticipantMapper;

    @Override
    public void addUserParticipant(UserParticipant userParticipant) {
        userParticipantMapper.insertSelective(userParticipant);
    }

    @Override
    public List<UserParticipant> selectByUserId(Integer userId) {
        return userParticipantMapper.selectByUserId(userId);
    }

    @Override
    public void deleteUserParticipant(Integer id) {
        userParticipantMapper.deleteByPrimaryKey(id);
    }
}
